import React from "react";
import "./App.css";
import { Input, Button, Tooltip } from "antd";
import { SearchOutlined } from "@ant-design/icons";
import { useNavigate } from "react-router-dom";
interface Props {
  name: string;
}
const User: React.FC<Props> = () => {
  const tiao = useNavigate();
  const login = () => {
    tiao("/app2");
  };

  const login_main = () => {
    tiao("/yao");
  };
  return (
    <div>
      <div>
        <Input placeholder="请选择你要对话的用户" style={{ width: "350px" }} />
        <Tooltip>
          <Button
            icon={<SearchOutlined />}
            onClick={() => {
              login();
            }}
          />
        </Tooltip>
      </div>
      <div>
        <Button
          onClick={() => {
            login_main();
          }}
          style={{ marginLeft: "250px", marginTop: "20px" }}
        >
          邀请用户连接
        </Button>{" "}
      </div>
    </div>
  );
};

export default User;



